﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.LEDCorrective.Domain.LEDSender
{
    /// <summary>
    /// 行校正系数
    /// </summary>
    /// <remarks>
    //  行校正系数
    //  struct _scp_row_adjust_t
    //  {
    //      u_int16_t					row;			/*<模组的行号，从0开始*/
    //      u_int16_t					pixelNum;	/*<每行的像素个数*/
    //      SCP_PIXEL_ADJUST_t		adjustDatas[0];/*<pixelNum个数组*/		
    //  }PACKED;
    //  typedef _scp_row_adjust_ _t
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct SCP_ROW_ADJUST_T
    {
        /// <summary>
        /// 模组的行号
        /// </summary>
        public UInt16 row;

        /// <summary>
        /// 每行的像素个数
        /// </summary>
        public UInt16 pixelNum;

        /// <summary>
        /// pixelNum个数组
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 192)] //TODO:
        public SCP_PIXEL_ADJUST_T[] adjustDatas;
    }
}
